home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / Demos / Bombardier_PC / BSCRIPTS.CST / 00122_Script_generalCursorChange < prev    next >
Text File  |  1999-04-25  |  3KB  |  113 lines

  1. -- ⌐ 1998 @radical.media, inc. & Concurrent New Media Group, L.L.C.
  2. -- Developed for Bombardier, Inc.
  3. --
  4. -- All programming developed by: 
  5. -- Robert Fabricant, Valerie Valoueva, Ossi Shaked, 
  6. -- Henry Sauvageot, Chris Howell & Chris Girand
  7. --
  8. -- Use of this code by parties other than @radical.media, inc. or their
  9. --agents 
  10. -- without the express written consent of @radical.media, inc. AND Concurrent 
  11. -- New Media Group, L.L.C. is strictly prohibited.
  12. ------------------------------------------------------
  13.  
  14. property CRImage,CRmask,CDimage,CDmask,handImage,handMask, nameRoot, chageOnMouseDown, inabled
  15.  
  16. on getPropertyDescriptionList me
  17.   set description = [:]
  18.   addProp description, #nameRoot,[#format:#string,¼
  19.                                        #default:"",#comment:"enter the  root of cast member used for cursor"]
  20.   addProp description, #chageOnMouseDown,[#format:#boolean,¼
  21.                                        #default:FALSE,#comment:"check the box if cursor should change on mouseDown"]
  22.  
  23.   return description
  24.   
  25. end  
  26.  
  27.  
  28.  
  29.  
  30. on get behaviorDescription
  31.   return"changes the cursor on rollover and mousedown otherwise set it to the default"
  32. end
  33.  
  34. on mousedown me
  35.   if inabled then
  36.     if chageOnMouseDown then
  37.       cursor [CDimage,CDmask] 
  38.       --  pass
  39.     end if
  40.   end if
  41.   
  42.   
  43. end
  44.  
  45. on beginSprite me
  46.   set handImage = the memberNum of member "handR-image" 
  47.   set handMask = the memberNum of member "handR-mask" 
  48.   set CRImage = the memberNum of member (nameRoot&"R-image")
  49.   set CRmask = the memberNum of member (nameRoot&"R-mask")
  50.   if chageOnMouseDown then
  51.     set CDimage = the memberNum of member (nameRoot&"D-image")
  52.     set CDmask = the memberNum of member (nameRoot&"D-mask")
  53.   end if
  54.   
  55.   set mySprite = the spriteNum of me
  56.   set aName = the name of member (the member of sprite mySprite)
  57.   if aName contains "invis" then
  58.     set inabled = FALSE
  59.   else
  60.     set inabled = TRUE
  61.   end if
  62.   
  63. end
  64.  
  65.  
  66. on mouseWithin me
  67.   if inabled then
  68.     if the mousedown then
  69.     else 
  70.       cursor[CRimage,CRmask]
  71.     end if
  72.     updateStage
  73.     pass
  74.     
  75.   end if
  76.   
  77. end
  78.  
  79. on mouseleave me
  80.   if inabled then
  81.     if  (IAmInExterior (me)) and rollover (6) then
  82.       cursor [handImage,handMask]
  83.     else
  84.       cursor -1
  85.       updateStage
  86.       --  pass
  87.     end if
  88.     
  89.   end if
  90.   
  91. end
  92.  
  93. on mouseup
  94.   if inabled then
  95.     cursor[CRimage,CRmask]
  96.     pass
  97.   end if
  98.   
  99.   
  100. end
  101.  
  102. on IAmInExterior me
  103.   global gselct,NumOfQTVRMenuItems, range
  104.   set qtvrPlaneSprNum = getSpriteNumFromMemberName("qtvranchor")+1
  105.   set range = NumOfQTVRMenuItems - 1
  106.   set exteriorSpriteNum = qtvrPlaneSprNum + range
  107.   if gselct = exteriorSpriteNum then
  108.     set value = TRUE
  109.   else
  110.     set value = FALSE
  111.   end if
  112.   return value
  113. end